import { defineStore } from 'pinia'
import api from '../../api/wrongRecord'
export default defineStore('store', {
  actions: {
    //查询错题列表
    async getWrongRecords() {
      const { data, code } = await api.listAll()
      return { data, code }
    },
    //逻辑删除错题本
    async deleteById(id: number) {
      const { data } = await api.delete(id)
      return { data }
    }
  }
})
